package org.museum.api.client;

import org.common.util.Result;
import org.museum.api.domain.IdentityName;
import org.museum.api.util.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "identityName-service", path = "/identityName")
public interface IdentityNameClient {
    @PostMapping
    Result addIdentityByName(IdentityName identityName);

    @GetMapping("/{identity}")
    CommonResponse<String> getIdentityName(@PathVariable String identity);
}
